package com.zl.csMall.mine.history.po;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @description: 历史浏览
 * @author: ChenNing
 * @date 2025-10-21 11:29
 */
@Data
@ApiModel(description = "历史浏览 实体")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class History implements Serializable {

    private static final long serialVersionUID = 1L;

    private long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "商品ID", required = true)
    @NotNull(message = "不能为空！")
    private Long commodityId;

    private Date createDate;

    public History() {
    }

    public History(long id, Long userId, Long commodityId, Date createDate) {
        this.id = id;
        this.userId = userId;
        this.commodityId = commodityId;
        this.createDate = createDate;
    }
}
